<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
        <link rel="stylesheet" href="${pageContext.request.contextPath}/css/query_mr.css">
        <script src="${pageContext.request.contextPath}/js/querymr.js"></script>
        <div class="main">
            <h1>病人处方表</h1>
            <form id="search" action="queryMR.action" method="post">
                <div class="serach">
                    <c:if test="${flag=='病人名字'}">
                        <span>医生名字</span><input type="radio" name="name" value="医生名字" class="radio">
                        <span>病人名字</span><input type="radio" name="name" value="病人名字" class="radio" checked>
                    </c:if>
                    <c:if test="${flag=='医生名字'}">
                        <span>医生名字</span><input type="radio" name="name" value="医生名字" class="radio" checked>
                        <span>病人名字</span><input type="radio" name="name" value="病人名字" class="radio">
                    </c:if>
                    <input id="pl_name" name="pl_name" type="text" class="input" placeholder="${query_tip}"
                        autocomplete="off"><input type="submit" class="button" value="搜索">
                </div>
            </form>
        </div>
        <div class="table_query">
            <table>
                <thead id="thead">
                    <tr>
                        <th>ID</th>
                        <th>门诊/住院病历号</th>
                        <th>日期</th>
                        <th>姓名</th>
                        <th>性别</th>
                        <th>年龄</th>
                        <th>费别</th>
                        <th>临床诊断</th>
                        <th>科别(病室及床号)</th>
                        <th>Rp</th>
                        <th>调配</th>
                        <th>复核</th>
                        <th>医生</th>
                        <th>药品金额</th>
                        <th>管理</th>
                    </tr>
                </thead>
                <tbody id="tbody">
                    <c:forEach items="${lists}" var="list" varStatus="stat">
                        <tr>
                            <td onclick="print_mr('${list.id}')">${stat.index+1}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_number}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_date}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_name}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_sex}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_age}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_expensetype}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_diagnosis}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_department}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_rp}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_deployment}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_review}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_doctor}</td>
                            <td onclick="print_mr('${list.id}')">${list.pl_amount}</td>
                            <td>
                                <input type="button" value="修改"
                                    onclick="javascript:window.location='queryMR.action?action=modify&id=${list.id}'">
                                <input type="button" value="删除" onclick="delete_mr('${list.id}')">
                            </td>
                        </tr>
                    </c:forEach>
                </tbody>
            </table>
        </div>